package chuangyi.com.org.ViewModel;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.databinding.Bindable;
import android.view.View;

import chuangyi.com.org.DOMIHome.adapter.ListBindingAdapter;

/**
 *
 * Created by zxh on 16/12/5.
 */
public class AllMenuModel extends ContextObservable {
    private ListBindingAdapter menus;
    @Bindable
    public ListBindingAdapter getMenus() {
        return menus;
    }

    public AllMenuModel(Context context, ListBindingAdapter menus){
        super(context);
        this.menus = menus;
    }

    public void onClickCancel(View view){
        Activity activity = (Activity)getContext();
        activity.setResult(Activity.RESULT_CANCELED);
        activity.finish();
    }
}
